home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / basic / ds40bpds.zip / SAMPLE.BAS < prev    next >
BASIC Source File  |  1991-11-01  |  6KB  |  138 lines

  1. ' $INCLUDE: 'DOORSORC.INT'
  2. PROGNAME$ = "Door Source Sampler"
  3. RELEASE$ = "1.0"
  4. CALL ClrScrn
  5. CLOSE #1
  6.  
  7. ' Some features that you might want to try now that you're on this
  8. ' side:
  9. '    F3 key - Toggles the printer toggle on/off (You'll see it on the status line)
  10. '    F5 key - Shells to DOS! (And saves/restores the screen)
  11. '    Try adding the command line parameter LOCAL, it will make Door Source
  12. '    run in a local mode (mainly meant for your own testing, not for regular
  13. '    use). Door Source will still read the configuration file, except now
  14. '    you don't have to have bbs interface file (because DS will ask you for
  15. '    a name and if you want ansi)
  16. CALL Send("Door Source 4.0 has many new features and additions", No, Yes, 10)
  17. CALL Send("To get the most out of this sampler, download a copy of it so", No, Yes, 10)
  18. CALL Send("can see how the new features are implemented!", No, Yes, 10)
  19.  
  20. CALL NL(1)
  21.  
  22. CALL Send("This is a demo of the new prompt input routine. It works best with ANSI on.", No, Yes, 11)
  23. Caps = Yes
  24. CALL PromptIncomm("Would you like to continue", Default1, 15, 1, 14)
  25. Caps = No
  26. IF ARG$ <> "Y" THEN CALL ExitDoor
  27. CALL NL(1)
  28.  
  29. CALL Send("This is a demo of the new entry prompt routine, it works well with any mode.", No, Yes, 11)
  30. CALL EntryIncomm("What do you want your alias to be (25 chars max) :", 25, 12, 14)
  31. CALL NL(1)
  32.  
  33. CALL Send("This is a demo of changing colors in mid-string without multiple calls.", No, Yes, 11)
  34. ' QSend is the same a Send except that it doesnt have the bell option or color option
  35. CALL QSend("@X0ABlue@X0BGreen@X0CRed@X0DMagenta@X0EYellow@X0FWhite", Yes)
  36.  
  37.  
  38. CALL NL(1)
  39.  
  40. CALL Send("This is a demo of the subsitution codes. (And that the Center routine will", No, Yes, 11)
  41. CALL Send("correctly calculate the right position to center it to.)", No, Yes, 11)
  42. WD$ = "Hello @FIRST@, today is @SYSDATE@."
  43. CALL Center(WD$)
  44. CALL Send(WD$, No, Yes, 13)
  45.  
  46. CALL NL(1)
  47.  
  48. CALL Send("Here are two demos, one of the protected input feature and the other", No, Yes, 11)
  49. CALL Send("of the limited input feature.", No, Yes, 11)
  50.  
  51. Protected.Input$ = "*" ' Make a * appear instead of what is typed
  52. CALL Incomm("What is your password?", No, No, 14)
  53. Protected.Input$ = ""  ' Disable the protected input
  54.  
  55. Table$ = "YN"           ' Allow only Y and N keys (backspace, enter and such are still allowed)
  56. CALL Incomm("You can only type Y and N, try it:", No, 1, 14)
  57. Table$ = Default.Table$ ' Set back to normal
  58.  
  59. CALL NL(1)
  60. CALL Send("The following will be a demo of the Windows routine in its NEW faster", No, Yes, 11)
  61. CALL Send("format. Unfortunetly, Windows is now a ANSI only routine. It will also", No, Yes, 11)
  62. CALL Send("show you the new WindowPrint and WindowInput routine, as well as the", No, Yes, 11)
  63. CALL Send("new MenuManager routine that is more friendly and handles more selections", No, Yes, 11)
  64. CALL QSend("@WAIT@", No)  ' Prints a Press [Any Key] to continue and waits
  65.  
  66. BackGroundColor = 1
  67. CALL ClrScrn
  68. CALL Windows(10, 10, 20, 70, 15, 1, 3, Yes)
  69. Row = 11
  70. Col = 11
  71. CALL WindowPrint("Hello there!", Row, Col, 14, 1)
  72. Row = 12
  73. Col = 11
  74. CALL WindowInput("What is your name?", 25, Row, Col, 12, 1)
  75.  
  76. BackGroundColor = 0
  77. CALL ClrScrn
  78.  
  79. DIM Menu$(11)
  80. Menu$(1) = "1@X0C) @X0FFirst option"
  81. Menu$(2) = "2@X0C) @X0FSecond option"
  82. Menu$(3) = "3@X0C) @X0FThird option"
  83. Menu$(4) = "4@X0C) @X0FFourth option"
  84. Menu$(5) = "5@X0C) @X0FFifth option"
  85. Menu$(6) = "6@X0C) @X0FSixth option"
  86. Menu$(7) = "7@X0C) @X0FSeveth option"
  87. Menu$(8) = "8@X0C) @X0FEighth option"
  88. Menu$(9) = "9@X0C) @X0FNinth option"
  89. Menu$(10) = "10@X0C)@X0FTenth option @X0B(@X0EBefore you could only have 9!@X0B)"
  90. Menu$(11) = "11@X0C)@X0FEleventh option"
  91. CALL MenuManager(Menu$(), Yes, 10, 11, 14, 0, 7, BarNum)
  92.  
  93. CALL Send("You picked " + STR$(BarNum), No, 2, 10)
  94.  
  95. ' Notice that instead of a Yes as the third parameter, a number 2 was
  96. ' put in place it. This will cause Door Source to send 2 enters after
  97. ' printing the screen, so you don't have to have CALL NL(1) right after it
  98. ' if you want a blank line after the line you just sent.
  99.  
  100. DIM Blck$(6)
  101.  
  102. Blck$(1) = "@X0BThis output may @X0Cnot@X0B look like anything special."
  103. Blck$(2) = "@X0FBut@X0B, it actually is! This is a example using the @X0Enew@X0B"
  104. Blck$(3) = "@X0ABlockSend@X0B routine. You can pass it an array and it will"
  105. Blck$(4) = "display it. Now you can easily @X0Fpre-program@X0C ENTIRE @X0B screens"
  106. Blck$(5) = "right into your program. You can use ANSI codes or the substitution"
  107. Blck$(6) = "codes too!"
  108.  
  109. CALL BlockSend(Blck$(), No, 6)
  110.  
  111. CALL NL(1)
  112.  
  113. CALL Send("This is a demo of the routine RainbowSend (by Daniel Sharpe)", No, Yes, 11)
  114. CALL RainbowSend("You've just won 1 MILLION dollars (not really!)", No, Yes, 10)
  115.  
  116. CALL ExitDoor
  117.  
  118. ' Of course there are lots of other features, but they can't all be shown
  119. ' in this program. Features such as routines to change DTR,CTS,and RTS
  120. ' status, a feature to stop a user from aborting a file being viewed with
  121. ' ViewFile, a feature to turn on/off carrier checking, a feature to
  122. ' that lets your program wrap itself up if the door has to expectedly end
  123. ' in case of loss of carrier or the sysop pressing F8, and the list goes
  124. ' on and on. To show you some numbers on how many changes have been done,
  125. ' here's two numbers:
  126. '  MAJOR changes (new routines, major changes to old): Over 35
  127. '  MINOR changes (new variables, optimization)       : Over 150
  128. ' Now in the minor changes, it doesnt mean 150 new variables, it means
  129. ' 150 minor changes to Door Source that include new variables and lots of
  130. ' other things. In fact, more unnessicary variables were removed than new
  131. ' ones were added. Now most of Door Source is VERY structured, there are
  132. ' virtually no GOTOs or GOSUB inside Door Source itself, instead there
  133. ' are many IF...END IFs, WHILE...WENDs, DO...LOOPs instead. The actual
  134. ' This version makes Door Source the most complete, most advanced,
  135. ' and the fastest door library for QuickBasic.
  136.  
  137.